home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ASME's Mechanical Engine…ing Toolkit 1997 December
/
ASME's Mechanical Engineering Toolkit 1997 December.iso
/
ai
/
prlg195b.lzh
/
LOGIC.LZH
/
SKOLEM.DOC
< prev
next >
Wrap
Text File
|
1986-11-07
|
1KB
|
26 lines
Contributed by Jim Adams of Bendix Aerospace.
The files "SKOLEM.OPS" and "SKOLEM.PRO" implement the translate
program described in C&M Appendix B and discussed in Chapter 10.
This is the program that translates predicate calculus statements
into Prolog statements. The program is named SKOLEM.PRO and is
started on the command line with "pdprolog SKOLEM.OPS". To
translate a predicate calculus statement you type, e.g. Three
sample predicate calculus statements are included in "SKOLEM.OPS"
and may be commented out.
?- translate(all(X,s(X)<->exists(Y,e(X,Y)))).
The answer should be something like:
s(X_1) :- e(X_1,Y_10).
e(X_1,f1(X_1) :- s(X_1).
(The particular example comes from "x is a set iff there is a y
such that x is an element of y", the first axiom of set theory.)
The op codes are found in trans.ops and follow C&M:
<-> if and only if
-> implies
& and
# or
~ not